/*
 * @Author: your name
 * @Date: 2021-06-12 11:21:48
 * @LastEditTime: 2021-06-16 14:53:55
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /swarm/src/index.js
 */
import React from 'react';
import ReactDOM from 'react-dom';
// import App from './App';
import Home from './pages/home/index.jsx';
import NodeAdmin from './pages/nodeAdmin/index.jsx';
import NodeUnfold from './pages/nodeUnfold/index.jsx'
import searchHash from './pages/searchHash/index.jsx'
import searchIndex from './pages/searchIndex/index.jsx'
import Header from './components/headerTop/index.jsx'
import reportWebVitals from './reportWebVitals';
import {BrowserRouter as Router , Route} from 'react-router-dom';
import { notification, Space } from 'antd';
import 'antd/dist/antd.css';
import './global.css'

React.$formNum=function(num){
  let number=parseFloat(num)
  let n=number.toLocaleString()
  return n
 }
React.$message=function(type,tips){
  notification[type]({
    message: tips
})}
ReactDOM.render((
  <Router>
      <Header />
      <div>
            <Route exact path="/" component={Home} />
            <Route  path="/Home" component={Home} />
            <Route  path="/NodeAdmin" component={NodeAdmin} />
            <Route  path="/NodeUnfold" component={NodeUnfold} />
            <Route  path="/searchHash" component={searchHash} />
            <Route  path="/searchIndex" component={searchIndex} />
      </div>
  </Router>
), document.getElementById('root'))

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
